\hypertarget{class_subscriber}{\section{Subscriber Class Reference}
\label{class_subscriber}\index{Subscriber@{Subscriber}}
}


{\ttfamily \#include $<$Subscriber.\-hpp$>$}

Inheritance diagram for Subscriber\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.646889cm]{class_subscriber}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_subscriber_acf994baa7d26eaa3d05c767b695e5d64}{Subscriber} ()
\item 
virtual \hyperlink{class_subscriber_a699f864e05fe964363aeaeb600eeb6b4}{$\sim$\-Subscriber} ()
\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename T $>$ }\\T \& \hyperlink{class_subscriber_adf012d21f14dd64d1afd95efe799d370}{Require\-Control} (T \&obj)
\item 
{\footnotesize template$<$typename T $>$ }\\boost\-::shared\-\_\-ptr$<$ T $>$ \hyperlink{class_subscriber_aa545a5133edce53707738ee55d7b47cc}{Launch} (boost\-::shared\-\_\-ptr$<$ T $>$ operation)
\item 
{\footnotesize template$<$typename T $>$ }\\boost\-::shared\-\_\-ptr$<$ T $>$ \hyperlink{class_subscriber_ac4d2c5853af0a642ce7f5b52b3d09112}{Launch} (T $\ast$operation, bool can\-Delete\-Operation=false)
\item 
void \hyperlink{class_subscriber_a8db71f899cdbf3608791b8506814c850}{Cancel\-All\-Operations} ()
\item 
virtual void \hyperlink{class_subscriber_a6ffeb82e812ef06db4aff08ee01d427b}{Handle\-Periodic} ()
\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_subscriber_af45e8a01b72511d7dc39a93fdbeada29}{class {\bfseries Systematic\-Robot}}\label{class_subscriber_af45e8a01b72511d7dc39a93fdbeada29}

\item 
\hypertarget{class_subscriber_a6474ceb8669761e879329b39c3afb899}{class {\bfseries Service}}\label{class_subscriber_a6474ceb8669761e879329b39c3afb899}

\item 
\hypertarget{class_subscriber_a6544cbdcc4e43246121df1b0400c13de}{class {\bfseries Robot\-Subsystem}}\label{class_subscriber_a6544cbdcc4e43246121df1b0400c13de}

\item 
\hypertarget{class_subscriber_adf8bc3840e3c07695fb1e05a801d1d92}{{\footnotesize template$<$typename Result $>$ }\\class {\bfseries Operation}}\label{class_subscriber_adf8bc3840e3c07695fb1e05a801d1d92}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
The \hyperlink{class_subscriber}{Subscriber} class is the base class for objects that subscribe to \hyperlink{class_systematic_robot}{Systematic\-Robot}'s events, directly or indirectly.

This class is untested. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_subscriber_acf994baa7d26eaa3d05c767b695e5d64}{\index{Subscriber@{Subscriber}!Subscriber@{Subscriber}}
\index{Subscriber@{Subscriber}!Subscriber@{Subscriber}}
\subsubsection[{Subscriber}]{\setlength{\rightskip}{0pt plus 5cm}Subscriber\-::\-Subscriber (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_subscriber_acf994baa7d26eaa3d05c767b695e5d64}
Constructor for \hyperlink{class_subscriber}{Subscriber}. \hypertarget{class_subscriber_a699f864e05fe964363aeaeb600eeb6b4}{\index{Subscriber@{Subscriber}!$\sim$\-Subscriber@{$\sim$\-Subscriber}}
\index{$\sim$\-Subscriber@{$\sim$\-Subscriber}!Subscriber@{Subscriber}}
\subsubsection[{$\sim$\-Subscriber}]{\setlength{\rightskip}{0pt plus 5cm}Subscriber\-::$\sim$\-Subscriber (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}}\label{class_subscriber_a699f864e05fe964363aeaeb600eeb6b4}
Destructor for \hyperlink{class_subscriber}{Subscriber}. 

\subsection{Member Function Documentation}
\hypertarget{class_subscriber_a8db71f899cdbf3608791b8506814c850}{\index{Subscriber@{Subscriber}!Cancel\-All\-Operations@{Cancel\-All\-Operations}}
\index{Cancel\-All\-Operations@{Cancel\-All\-Operations}!Subscriber@{Subscriber}}
\subsubsection[{Cancel\-All\-Operations}]{\setlength{\rightskip}{0pt plus 5cm}void Subscriber\-::\-Cancel\-All\-Operations (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}}}\label{class_subscriber_a8db71f899cdbf3608791b8506814c850}
Cancels all operations that the subscriber launched. \hypertarget{class_subscriber_a6ffeb82e812ef06db4aff08ee01d427b}{\index{Subscriber@{Subscriber}!Handle\-Periodic@{Handle\-Periodic}}
\index{Handle\-Periodic@{Handle\-Periodic}!Subscriber@{Subscriber}}
\subsubsection[{Handle\-Periodic}]{\setlength{\rightskip}{0pt plus 5cm}void Subscriber\-::\-Handle\-Periodic (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}, {\ttfamily [virtual]}}}\label{class_subscriber_a6ffeb82e812ef06db4aff08ee01d427b}
This function is run every periodic loop.

This function is called every periodic loop when subscribed to the robot. See \hyperlink{class_systematic_robot}{Systematic\-Robot} documentation for more on periodic loops and subscription. This function should be overridden to handle the periodic \hyperlink{class_subscriber}{Subscriber} tasks. 

Reimplemented in \hyperlink{class_tank_drive_subsystem_ab834b550c5bc2aa5ea164201287a3ebf}{Tank\-Drive\-Subsystem}, \hyperlink{class_mecanum_drive_subsystem_adf2c3d907fc8271f70dee8eb3be2576f}{Mecanum\-Drive\-Subsystem}, \hyperlink{class_selector_service_a03e873370af26ecad1d1ac5a77d62c42}{Selector\-Service$<$ Item $>$}, \hyperlink{class_selector_service_a03e873370af26ecad1d1ac5a77d62c42}{Selector\-Service$<$ Service $\ast$ $>$}, \hyperlink{class_two_joystick_drive_service_aac337e302b872d3126366ceb966aec3c}{Two\-Joystick\-Drive\-Service$<$ Drive, Value, Handler $>$}, \hyperlink{class_two_joystick_drive_service_aac337e302b872d3126366ceb966aec3c}{Two\-Joystick\-Drive\-Service$<$ Mecanum\-Drive\-Subsystem, Cartesian\-Value, Mecanum\-Drive\-Subsystem\-::\-Drive\-By\-Cartesian $>$}, \hyperlink{class_two_joystick_drive_service_aac337e302b872d3126366ceb966aec3c}{Two\-Joystick\-Drive\-Service$<$ Tank\-Drive\-Subsystem, Tank\-Value, Tank\-Drive\-Subsystem\-::\-Drive\-By\-Tank $>$}, \hyperlink{class_joystick_drive_service_a14aafab1dedef204fbb3b4687e337732}{Joystick\-Drive\-Service$<$ Drive, Value, Handler $>$}, \hyperlink{class_joystick_drive_service_a14aafab1dedef204fbb3b4687e337732}{Joystick\-Drive\-Service$<$ Tank\-Drive\-Subsystem, Tank\-Value, Tank\-Drive\-Subsystem\-::\-Drive\-By\-Tank $>$}, \hyperlink{class_async_result_finish_state_a9c327aa447e197c8f6e3b50150d46162}{Async\-Result\-Finish\-State$<$ Result $>$}, \hyperlink{class_xbox_drive_service_a1eb41645f36bf2a5c20777b0659fab12}{Xbox\-Drive\-Service$<$ Drive, Value, Handler $>$}, \hyperlink{class_xbox_drive_service_a1eb41645f36bf2a5c20777b0659fab12}{Xbox\-Drive\-Service$<$ Mecanum\-Drive\-Subsystem, Cartesian\-Value, Mecanum\-Drive\-Subsystem\-::\-Drive\-By\-Cartesian $>$}, \hyperlink{class_robot_subsystem_a7066b5d072b9ff707aabad9c46fcdc55}{Robot\-Subsystem}, \hyperlink{class_ps3_drive_service_ab169aaf1d278843a0b7df0aea3396b9b}{Ps3\-Drive\-Service$<$ Drive, Value, Fetcher, Handler $>$}, \hyperlink{class_service_a9604d04295202019e9a15f8c93bb31c6}{Service}, \hyperlink{class_state_a29e67195da90c4c44e0e8f0fbe938c7c}{State}, \hyperlink{class_state_machine_service_a6d449ca476108879d39c457f6ed0c443}{State\-Machine\-Service}, \hyperlink{class_live_window_service_afbb5d49a99c6d033d4556f9e32917ad3}{Live\-Window\-Service}, \hyperlink{class_game_service_a8a71b44e940f9698128ca46b19ed7abb}{Game\-Service}, \hyperlink{class_async_status_finish_state_a21f727ef7e4c1e5f284febf8f649f19a}{Async\-Status\-Finish\-State}, and \hyperlink{class_time_wait_state_a67589e93acff3c395470f3fb4ad43e57}{Time\-Wait\-State}.

\hypertarget{class_subscriber_aa545a5133edce53707738ee55d7b47cc}{\index{Subscriber@{Subscriber}!Launch@{Launch}}
\index{Launch@{Launch}!Subscriber@{Subscriber}}
\subsubsection[{Launch}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ boost\-::shared\-\_\-ptr$<$T$>$ Subscriber\-::\-Launch (
\begin{DoxyParamCaption}
\item[{boost\-::shared\-\_\-ptr$<$ T $>$}]{operation}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [protected]}}}\label{class_subscriber_aa545a5133edce53707738ee55d7b47cc}
Launch an \hyperlink{class_operation}{Operation} within this \hyperlink{class_subscriber}{Subscriber}.


\begin{DoxyParams}{Parameters}
{\em operation} & A shared pointer to \hyperlink{class_operation}{Operation} to be launched.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A shared pointer to the launched \hyperlink{class_operation}{Operation} (same as \char`\"{}operation\char`\"{}). 
\end{DoxyReturn}
\hypertarget{class_subscriber_ac4d2c5853af0a642ce7f5b52b3d09112}{\index{Subscriber@{Subscriber}!Launch@{Launch}}
\index{Launch@{Launch}!Subscriber@{Subscriber}}
\subsubsection[{Launch}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ boost\-::shared\-\_\-ptr$<$T$>$ Subscriber\-::\-Launch (
\begin{DoxyParamCaption}
\item[{T $\ast$}]{operation, }
\item[{bool}]{can\-Delete\-Operation = {\ttfamily false}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [protected]}}}\label{class_subscriber_ac4d2c5853af0a642ce7f5b52b3d09112}
Launch an \hyperlink{class_operation}{Operation} within this \hyperlink{class_subscriber}{Subscriber}.


\begin{DoxyParams}{Parameters}
{\em operation} & A pointer to \hyperlink{class_operation}{Operation} to be launched. \\
\hline
{\em can\-Delete\-Operation} & If the \hyperlink{class_subscriber}{Subscriber} can delete the \hyperlink{class_operation}{Operation} so long as it functions correctly and no shared pointer is kept.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A shared pointer to the launched operation. 
\end{DoxyReturn}
\hypertarget{class_subscriber_adf012d21f14dd64d1afd95efe799d370}{\index{Subscriber@{Subscriber}!Require\-Control@{Require\-Control}}
\index{Require\-Control@{Require\-Control}!Subscriber@{Subscriber}}
\subsubsection[{Require\-Control}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ T\& Subscriber\-::\-Require\-Control (
\begin{DoxyParamCaption}
\item[{T \&}]{obj}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [protected]}}}\label{class_subscriber_adf012d21f14dd64d1afd95efe799d370}
Add required control lock on an object (such as a \hyperlink{class_robot_subsystem}{Robot\-Subsystem}).

The lock is only acquired when the subscriber/service/operation is running. This prevents two unrelated subscribers from using the same object at the same time. For more information on using locking, see our \hyperlink{class_thread}{Thread} Safety Manuel that does not exist yet. \-:P


\begin{DoxyParams}{Parameters}
{\em obj} & A reference to the object to be locked.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The obj parameter. 
\end{DoxyReturn}


The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
C\-:/\-Users/\-Sam/\-Projects/\-F\-R\-C/\-Libraries/\-Fpk/\-Entech-\/\-Fpk-\/\-Subscribers/\-Entech-\/\-Fpk/Subscriber.\-hpp\item 
C\-:/\-Users/\-Sam/\-Projects/\-F\-R\-C/\-Libraries/\-Fpk/\-Entech-\/\-Fpk-\/\-Subscribers/\-Entech-\/\-Fpk/Subscriber.\-cpp\end{DoxyCompactItemize}
